package com.echoplots.cros.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestController {

    @RequestMapping("index")
    public String index () {
        return "index";
    }
	
	

    //接口编程 WebConfigurer
/*    @RequestMapping("hello")
    @ResponseBody
    public String hello(){
        return "hello";
    }*/
    
    //接口编程 CrosFilter
    @RequestMapping("hello")
    @ResponseBody
    public String hello(){
        return "hello";
    }    
    
	//注解驱动实现@CrossOrigin
/*	@GetMapping("hello")
	@ResponseBody
	@CrossOrigin(value = "*")
	public String hello() {
	    return "hello";
	}*/
}
